using System;
using Microsoft.SPOT;
using GHIElectronics.NETMF.Hardware;

namespace AstroX
{
    public class FirgelliActuator
    {
        Servo p;
        public FirgelliActuator(PWM.Pin actuatorPin)
        {
            p = new Servo((GHIElectronics.NETMF.FEZ.FEZ_Pin.PWM)actuatorPin);
        }

        int _setPosition = 0;

        public int SetPosition
        {
            get { return _setPosition; }
            set { _setPosition = value; WritePosition(); }
        }

        private void WritePosition()
        {
            p.Degree = _setPosition;
        }
    }
}
